define(function (require, exports, module) {
    var FXREADER = require('./FXReader');
    require('./Config.js');
    
    FXREADER.AjaxRetryManager = 
    {
    	GetNextPageImageRequestInterval: function(curPageIndex,progress,pageCount)
    	{
    		var totalProcessCount = pageCount + 2;
    		if(progress>totalProcessCount || curPageIndex+2<=progress) //converted page
    			return 1000; //1s
    		else
    		{
    			return 1500*(curPageIndex+2-progress);
    		}
    	},
    	GetNextAnnotDataRequestInterval: function(pageCount)
    	{
    		return 500*pageCount;
    	},
    	GetNextBookmarkDataRequestInterval: function(pageCount)
    	{
    		return 500*pageCount;
    	},
    	GetNextFormXmlRequestInterval: function(curPageIndex,progress,pageCount)
    	{
    		var totalProcessCount = pageCount + 2;
    		if(progress>totalProcessCount || curPageIndex+2<=progress) //converted page
    			return 1000; //1s
    		else
    		{
    			return 1500*(curPageIndex+2-progress);
    		}
    	}
    };
});